<?php
//phpinfo(); 
require_once(realpath(dirname(__FILE__)).'/config/conf.php');

//Require Components
require_once(realpath(dirname(__FILE__)).'/lib/models/front.php');
require_once(realpath(dirname(__FILE__)).'/lib/models/icontroller.php');
require_once(realpath(dirname(__FILE__)).'/lib/models/view.php');

//Require Controllers
require_once(realpath(dirname(__FILE__)).'/lib/controllers/index.php');
require_once(realpath(dirname(__FILE__)).'/lib/controllers/UsersController.php');
require_once(realpath(dirname(__FILE__)).'/lib/controllers/ClientsController.php');
require_once(realpath(dirname(__FILE__)).'/lib/controllers/ProductsController.php');
require_once(realpath(dirname(__FILE__)).'/lib/controllers/InvoicesController.php');
//Requiere Interfaces
require_once(realpath(dirname(__FILE__)).'/lib/models/interfaces/IUser.php');
require_once(realpath(dirname(__FILE__)).'/lib/models/interfaces/IClient.php');
require_once(realpath(dirname(__FILE__)).'/lib/models/interfaces/IProduct.php');
require_once(realpath(dirname(__FILE__)).'/lib/models/interfaces/IInvoice.php');
//Requiere Models

require_once(realpath(dirname(__FILE__)).'/lib/models/ActorUser.php');
require_once(realpath(dirname(__FILE__)).'/lib/models/PhoneClient.php');
require_once(realpath(dirname(__FILE__)).'/lib/models/Product.php');
require_once(realpath(dirname(__FILE__)).'/lib/models/Invoice.php');
require_once(realpath(dirname(__FILE__)).'/lib/models/InvoiceProduct.php');

//Requiere Others
require_once(realpath(dirname(__FILE__)).'/lib/utils/validations.php');

//Require Bd
require_once(realpath(dirname(__FILE__)).'/lib/utils/Bd.php');

//Requiere DAO
require_once(realpath(dirname(__FILE__)).'/lib/dao/UsersDAO.php');
require_once(realpath(dirname(__FILE__)).'/lib/dao/ClientsDAO.php');
require_once(realpath(dirname(__FILE__)).'/lib/dao/ProductsDAO.php');

//Requiere External
require_once(realpath(dirname(__FILE__)).'/lib/ext/PHPTAL/PHPTAL.php');
require_once(realpath(dirname(__FILE__)).'/lib/utils/others.php');

//Initialize the FrontController
$front = FrontController::getInstance();
$front->route();

echo $front->getBody();